/*
 * Copyright 2003-2005 (c) Live Media Pty Ltd. <argot@einet.com.au> 
 *
 * This software is licensed under the Argot Public License 
 * which may be found in the file LICENSE distributed 
 * with this software.
 *
 * More information about this license can be found at
 * http://www.einet.com.au/License
 * 
 * The Developer of this software is Live Media Pty Ltd,
 * PO Box 4591, Melbourne 3001, Australia.  The license is subject 
 * to the law of Victoria, Australia, and subject to exclusive 
 * jurisdiction of the Victorian courts.
 */

#include "../Types.h"

#include "BigEndianSignedByte.h"

type_name sint8_name = { "s8" };

int sint8_read(type_input_stream * in, type_element * element ) 
{
	int i;

	i = type_input_read_buffer( in, (char *) &(in->stack.top->data.s8), 1 );	
	if ( i == -1 ) 
	{
		type_input_set_error( in, TYPE_EOF );
		return TYPE_EOF;
	}
	type_input_set_type( in, element );	
	return TYPE_OK;
}

int sint8_write( type_output_stream * out, void * o, type_element * element ) 
{
	type_output_write_buffer( out, (char *) o, 1 );
	return TYPE_OK;
}

